import java.util.regex.Matcher;
import java.util.regex.Pattern;

/**
 * @author dreamcatcher
 * @date 2022/3/2 22:20
 */
public class RegExp13 {
    public static void main(String[] args) {
        //获取五位数的回文串
        String regStr = "(\\d)(\\d)(\\d)\\2\\1";
        String content = "123451232145654";

        Pattern pattern = Pattern.compile(regStr);
        Matcher matcher = pattern.matcher(content);
        while (matcher.find()){
            System.out.println(matcher.group());
        }
    }
}
